package ics414draft;
import java.util.*;
import java.io.*;

/**
 * This is a prototype class of our Dive Group Calculator method(s)
 * Feel free to add in/implement other methods, just please make sure
 * to update comments as much as possible
 * @author Kent
 * @date 10/24/2014
 */
public class DiveGroupCalculatorTest {
	/**
	 * Variables that will be used to store the user's inputs 
	 * These inputs will be used to plan out the user's dives
	 */
	private int 	userDepth;	//a int that will determine the depth input
	private String 	unit;		//a String that will determine if depth is in meters or feet
	private int 	userTime;	//a int that will determine the user time
	private char 	userGroup;  //a char that will return the dive group
	private int 	check; 		//a int that will determine if the user input is acceptable
	private int 	decompress; //a int that will represent the decompress time
	
	/**
	 * Constructor of the Dive Group Calculator test class
	 * It will save the parameters as the user inputs
	 * There are only groups from a - l in the NAUI dive table, 
	 * 	so I implemented it in the same way
	 */
	public DiveGroupCalculatorTest() {
		check = 0;
		decompress = 0;
	}
	
	/**
	 * A getter method for the diver's depth
	 * @return
	 */
	public int getUserDepth() {
		return userDepth;
	}
	
	/*
	 * A getter method for the diver's depth units
	 */
	public String getUnit(){
		return unit;
	}

	/*
	 * A getter method for the diver's dive time
	 */
	public int getUserTime(){
		return userTime;
	}
	

	/*
	 * A getter method for the diver's group
	 */
	public char getDiveGroup(){
		return userGroup;
	}
	
	/*
	 * A method that will return a boolean stating if the divers
	 * 	input is acceptable or not
	 * @return constraint
	 */
	public int getCheck(){
		return check;
	}
	
	/*
	 * A method that will return the time it will require a diver
	 * 	to decompress their nitrogen levels in their body
	 */
	public int getDecompress(){
		return decompress;
	}
	
	/**
	 * A method that will set the constraint boolean
	 * @param set
	 */
	public void setCheck(int set){
		check = set;
	}
	
	/*
	 * A setter method that will set what type
	 * of units the diver wants. It must be either
	 * m or ft
	 */
	public void setUnit(String unit){
		
		if(!unit.equals("m") && !unit.equals("ft")){
			System.out.println("You must input either 'm' or 'ft'.\nTry again");
			setCheck(-1);
		}
		else{
			this.unit = unit;
			setCheck(0);
			//System.out.println("Accepted");
		}
	}
	
	/*
	 * A setter method that will set the depth 
	 * 	the diver wants to go
	 */
	public void setDepth(int depth){
		userDepth = depth;
	}
	
	/*
	 * A setter method that will set the time the 
	 * 	diver wants to go
	 */
	public void setTime(int time){
		userTime = time;
	}
	
	/**
	 * A setter method that will set which group
	 * 	the diver will belong to
	 * @param group
	 */
	public void setGroup(char group){
		userGroup = group;
	}
	
	/**
	 * A setter method that will set the decompress time
	 * 	for the divers
	 */
	public void setDecompress(int time){
		decompress = time;
	}
	
	/**
	 * A method that will calculate which dive group the user 
	 * 	will belong to
	 * If the user input is not acceptable, then check will equal -1. My idea is 
	 * 	that there will be a while loop in the user interface, and if check != 0
	 * 	then it will continuously ask the user until there is a valid input
	 * @param depth
	 * @param time
	 */
	public void calculateGroup(int depth, int time){
		
		if(getUnit().equals("m")){ 																						//User inputs meters
			
			if(depth <= 0){																								//USER DEPTH IMPOSSIBLE
				System.out.println("You must input a depth greater than 0");
				setCheck(-1);
			}
			else if(depth > 40){																						//USER DEPTH HAZARDOUS
				System.out.println("Do not dive below 40 meters");
				setCheck(-1);
			}
			
			else if(depth <= 12){ 																						//USER DEPTH <= 12 METERS
				if(time <= 0){
					System.out.println("You must input a time greater than 0");
					setCheck(-1);
				}
				else if(time > 150){																					//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 150");
					setCheck(-1);
				}
				
				else if(time > 130 && time <= 150){																		//If user time is between 130-150
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() +" minutes at every 5m");
					setCheck(0);
					setGroup('L');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 110 && time <= 130){																		//If user time is between 110-130
					setCheck(0);
					setGroup('K');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 100 && time <= 110){																		//If user time is between 100-110
					setCheck(0);
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 80 && time <= 100){																		//If user time is between 80-100
					setCheck(0);
					setGroup('I');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 70 && time <= 80){																		//If user time is between 70-80
					setCheck(0);
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 50 && time <= 70){																		//If user time is between 50-70
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 40 && time <= 50){																		//If user time is between 40-50
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 30 && time <= 40){																		//If user time is between 30-40
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 25 && time <= 30){																		//If user time is between 25-30
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 25){																		//If user time is between 15-25
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 15){																		//If user time is between 5-15
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//If user time is between 0-5
					setCheck(0);
					setGroup('A');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			
			else if(depth > 12 && depth <= 15) {																		//USER DEPTH BETWEEN 12-15 METERS
				
				if(time <= 0){
					System.out.println("You must input a time greater than 0");
					setCheck(-1);
				}
				else if(time > 100){																					//If user wants to input fatal parameters
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 100");
					setCheck(-1);				
				}
				else if(time > 80 && time <= 100){																		//If user time is between 80-100
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setCheck(0);
					setGroup('L');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 70 && time <=80){																		//If user time is between 70-80
					setCheck(0);
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 60 && time <=70){																		//If user time is between 60-70
					setCheck(0);
					setGroup('I');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 50 && time <=60){																		//If user time is between 50-60
					setCheck(0);
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 40 && time <=50){																		//If user time is between 40-50
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 30 && time <=40){																		//If user time is between 30-40
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 25 && time <=30){																		//If user time is between 25-30
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <=25){																		//If user time is between 15-25
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <=15){																		//If user time is between 10-15
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 15 && depth <= 18){																			//DEPTH BETWEEN 15 AND 18 METERS
				
				if(time <= 0){																							//User input cannot be negative
					setCheck(-1);
					System.out.println("You must input a time greater than 0");
				}
				else if(time > 80){																						//Hazardous user time
					setCheck(-1);
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 80");
				}
				else if(time > 60 && time <= 80){																		//User time between 60-80
					setCheck(0);
					setGroup('L');
					setDecompress(7);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 55 && time <= 60){																		//User time between 55-60
					setCheck(0);
					setGroup('J');
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 50 && time <= 55){																		//User time between 50-55
					setCheck(0);
					setGroup('I');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 40 && time <= 50){																		//User time between 40-50
					setCheck(0);
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 30 && time <= 40){																		//User time between 30-40
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 25 && time <= 30){																		//User time between 25-30
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 20 && time <= 25){																		//User time between 20-25
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 20){																		//User time between 15-20
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 15){																		//User time between 10-15	
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			
			else if(depth > 18 && depth <= 21){																			//DEPTH BETWEEN 18 AND 21 METERS
				
				if(time <= 0){																							//User input cannot be negative
					setCheck(-1);
					System.out.println("You must input a time greater than 0");
				}
				else if(time > 70){																						//Hazardous user time
					setCheck(-1);
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 70");
				}
				else if(time > 60 && time <= 70){																		//User time between 60-70
					setCheck(0);
					setDecompress(14);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('L');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 50 && time <= 60){																		//User time between 50-60
					setCheck(0);
					setDecompress(8);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('K');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 45 && time <= 50){																		//User time between 45-50
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 40 && time <= 45){																		//User time between 40-45
					setCheck(0);
					setGroup('I');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 35 && time <= 40){																		//User time between 35-40
					setCheck(0);
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 30 && time <= 35){																		//User time between 30-35
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 20 && time <= 30){																		//User time between 20-30
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 20){																		//User time between 15-20
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 15){																		//User time between 10-15
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 10){																		//User time between 5-10
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 21 && depth <= 24){																			//DEPTH BETWEEN 21-24 METERS
				
				if(time <= 0){																							//Impossible depth time
					System.out.println("You must input a time greater than 0");	
					setCheck(-1);
				}
				else if(time > 60){																						//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 60");
					setCheck(-1);
				}
				else if(time > 50 && time <= 60){																		//User time between 50-60
					setCheck(0);
					setDecompress(17);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('L');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 40 && time <= 50){																		//User time between 40-50
					setCheck(0);
					setDecompress(10);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('K');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 35 && time <= 40){																		//User time between 35-40
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('I');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 30 && time <= 35){																		//User time between 30-35
					setCheck(0);
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 25 && time <= 30){																		//User time between 25-30
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 20 && time <= 25){																		//User time between 20-25
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 20){																		//User time between 15-20
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 15){																		//User time between 10-15
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 10){																		//User time between 5-10
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());	
				}
			}
			else if(depth > 24 && depth <= 27){																			//DEPTH BETWEEN 24-27 METERS
				
				if(time <= 0){																							//Impossible depth time
					System.out.println("You must input a time greater than 0");	
					setCheck(-1);
				}
				else if(time > 50){																						//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 50");
					setCheck(-1);
				}
				else if(time > 40 && time <= 50){																		//User time between 40-50
					setCheck(0);
					setDecompress(18);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('L');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 30 && time <= 40){																		//User time between 30-40
					setCheck(0);
					setDecompress(7);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 25 && time <= 30){																		//User time between 25-30
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 20 && time <= 25){																		//User time between 20-25
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 20){																		//User time between 15-20
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 12 && time <= 15){																		//User time between 12-15
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 12){																		//User time between 10-12
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 10){																		//User time between 5-10
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 27 && depth <= 30){																			//DEPTH BETWEEN 27-30 METERS
				
				if(time <= 0){																							//Impossible depth time
					System.out.println("You must input a time greater than 0");	
					setCheck(-1);
				}
				else if(time > 40){																						//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 40");
					setCheck(-1);
				}
				else if(time > 25 && time <= 40){																		//User time between 25-40
					setCheck(0);
					setDecompress(15);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('K');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 22 && time <= 25){																		//User time between 22-25
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 20 && time <= 22){																		//User time between 20-22
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 20){																		//User time between 15-20
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 15){																		//User time between 10-15
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 7 && time <= 10){																		//User time between 7-10
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 7){																			//User time between 5-7
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 30 && depth <= 33){																			//DEPTH BETWEEN 30-33 METERS
				
				if(time <= 0){																							//Impossible depth time
					System.out.println("You must input a time greater than 0");	
					setCheck(-1);
				}
				else if(time > 30){																						//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 30");
					setCheck(-1);
				}
				else if(time > 20 && time <= 30){																		//User time between 20-30
					setCheck(0);
					setDecompress(7);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 20){																		//User time between 15-20
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 13 && time <= 15){																		//User time between 13-15
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 13){																		//User time between 10-13
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 10){																		//User time between 5-7
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 33 && depth <= 36){																			//DEPTH BETWEEN 33-36 METERS
				
				if(time <= 0){																							//Impossible depth time
					System.out.println("You must input a time greater than 0");	
					setCheck(-1);
				}
				else if(time > 30){																						//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 30");
					setCheck(-1);
				}
				else if(time > 25 && time <= 30){																		//User time between 25-30
					setCheck(0);
					setDecompress(14);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 25){																		//User time between 15-25
					setCheck(0);
					setDecompress(6);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('I');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 12 && time <= 15){																		//User time between 12-15
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 12){																		//User time between 10-12
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 10){																		//User time between 5-10
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 36 && depth <= 40){																			//DEPTH BETWEEN 36-40 METERS
				
				if(time <= 0){																							//Impossible depth time
					System.out.println("You must input a time greater than 0");	
					setCheck(-1);
				}
				else if(time > 25){																						//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 25");
					setCheck(-1);
				}
				else if(time > 10 && time <= 25){																		//User time between 10-25
					setCheck(0);
					setDecompress(10);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 8 && time <= 10){																		//User time between 8-10
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 5 meters");
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 8){																			//User time between 5-8
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
		}
		
		else{																											//USER INPUT = FEET
			
			if(depth <= 0){																								//USER DEPTH IMPOSSIBLE
				System.out.println("You must input a depth greater than 0");
				setCheck(-1);
			}
			else if(depth > 130){																						//USER DEPTH HAZARDOUS
				System.out.println("Do not dive below " + depth + " " + getUnit());
				setCheck(-1);
			}
			else if(depth <= 40){ 																						//USER DEPTH <= 40 FEET
				if(time <= 0){
					System.out.println("You must input a time greater than 0");
					setCheck(-1);
				}
				else if(time > 150){																					//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 150");
					setCheck(-1);
				}
				
				else if(time > 130 && time <= 150){																		//If user time is between 130-150
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() +" minutes at every 15 feet");
					setCheck(0);
					setGroup('L');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 110 && time <= 130){																		//If user time is between 110-130
					setCheck(0);
					setGroup('K');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 100 && time <= 110){																		//If user time is between 100-110
					setCheck(0);
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 80 && time <= 100){																		//If user time is between 80-100
					setCheck(0);
					setGroup('I');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 70 && time <= 80){																		//If user time is between 70-80
					setCheck(0);
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 50 && time <= 70){																		//If user time is between 50-70
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 40 && time <= 50){																		//If user time is between 40-50
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 30 && time <= 40){																		//If user time is between 30-40
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 25 && time <= 30){																		//If user time is between 25-30
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 25){																		//If user time is between 15-25
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 15){																		//If user time is between 5-15
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//If user time is between 0-5
					setCheck(0);
					setGroup('A');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 40 && depth <= 50) {																		//USER DEPTH BETWEEN 40-50 FEET
				
				if(time <= 0){
					System.out.println("You must input a time greater than 0");
					setCheck(-1);
				}
				else if(time > 100){																					//If user wants to input fatal parameters
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 100");
					setCheck(-1);				
				}
				else if(time > 80 && time <= 100){																		//If user time is between 80-100
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setCheck(0);
					setGroup('L');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 70 && time <=80){																		//If user time is between 70-80
					setCheck(0);
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 60 && time <=70){																		//If user time is between 60-70
					setCheck(0);
					setGroup('I');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 50 && time <=60){																		//If user time is between 50-60
					setCheck(0);
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 40 && time <=50){																		//If user time is between 40-50
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 30 && time <=40){																		//If user time is between 30-40
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 25 && time <=30){																		//If user time is between 25-30
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <=25){																		//If user time is between 15-25
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <=15){																		//If user time is between 10-15
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 50 && depth <= 60){																			//DEPTH BETWEEN 50-60 FEET
				
				if(time <= 0){																							//User input cannot be negative
					setCheck(-1);
					System.out.println("You must input a time greater than 0");
				}
				else if(time > 80){																						//Hazardous user time
					setCheck(-1);
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 80");
				}
				else if(time > 60 && time <= 80){																		//User time between 60-80
					setCheck(0);
					setGroup('L');
					setDecompress(7);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 55 && time <= 60){																		//User time between 55-60
					setCheck(0);
					setGroup('J');
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 50 && time <= 55){																		//User time between 50-55
					setCheck(0);
					setGroup('I');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 40 && time <= 50){																		//User time between 40-50
					setCheck(0);
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 30 && time <= 40){																		//User time between 30-40
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 25 && time <= 30){																		//User time between 25-30
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 20 && time <= 25){																		//User time between 20-25
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 20){																		//User time between 15-20
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 15){																		//User time between 10-15	
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 60 && depth <= 70){																			//DEPTH BETWEEN 60-70 FEET
				
				if(time <= 0){																							//User input cannot be negative
					setCheck(-1);
					System.out.println("You must input a time greater than 0");
				}
				else if(time > 70){																						//Hazardous user time
					setCheck(-1);
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 70");
				}
				else if(time > 60 && time <= 70){																		//User time between 60-70
					setCheck(0);
					setDecompress(14);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('L');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 50 && time <= 60){																		//User time between 50-60
					setCheck(0);
					setDecompress(8);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('K');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 45 && time <= 50){																		//User time between 45-50
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 40 && time <= 45){																		//User time between 40-45
					setCheck(0);
					setGroup('I');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 35 && time <= 40){																		//User time between 35-40
					setCheck(0);
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 30 && time <= 35){																		//User time between 30-35
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 20 && time <= 30){																		//User time between 20-30
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 20){																		//User time between 15-20
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 15){																		//User time between 10-15
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 10){																		//User time between 5-10
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 70 && depth <= 80){																			//DEPTH BETWEEN 70-80 FEET
				
				if(time <= 0){																							//Impossible depth time
					System.out.println("You must input a time greater than 0");	
					setCheck(-1);
				}
				else if(time > 60){																						//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 60");
					setCheck(-1);
				}
				else if(time > 50 && time <= 60){																		//User time between 50-60
					setCheck(0);
					setDecompress(17);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('L');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 40 && time <= 50){																		//User time between 40-50
					setCheck(0);
					setDecompress(10);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('K');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 35 && time <= 40){																		//User time between 35-40
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('I');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 30 && time <= 35){																		//User time between 30-35
					setCheck(0);
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 25 && time <= 30){																		//User time between 25-30
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 20 && time <= 25){																		//User time between 20-25
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 20){																		//User time between 15-20
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 15){																		//User time between 10-15
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 10){																		//User time between 5-10
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());	
				}
			}
			else if(depth > 80 && depth <= 90){																			//DEPTH BETWEEN 80-90 FEET
				
				if(time <= 0){																							//Impossible depth time
					System.out.println("You must input a time greater than 0");	
					setCheck(-1);
				}
				else if(time > 50){																						//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 50");
					setCheck(-1);
				}
				else if(time > 40 && time <= 50){																		//User time between 40-50
					setCheck(0);
					setDecompress(18);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('L');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 30 && time <= 40){																		//User time between 30-40
					setCheck(0);
					setDecompress(7);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 25 && time <= 30){																		//User time between 25-30
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 20 && time <= 25){																		//User time between 20-25
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 20){																		//User time between 15-20
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 12 && time <= 15){																		//User time between 12-15
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 12){																		//User time between 10-12
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 10){																		//User time between 5-10
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 90 && depth <= 100){																		//DEPTH BETWEEN 90-100 FEET
				
				if(time <= 0){																							//Impossible depth time
					System.out.println("You must input a time greater than 0");	
					setCheck(-1);
				}
				else if(time > 40){																						//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 40");
					setCheck(-1);
				}
				else if(time > 25 && time <= 40){																		//User time between 25-40
					setCheck(0);
					setDecompress(15);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('K');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 22 && time <= 25){																		//User time between 22-25
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('H');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 20 && time <= 22){																		//User time between 20-22
					setCheck(0);
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 20){																		//User time between 15-20
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 15){																		//User time between 10-15
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 7 && time <= 10){																		//User time between 7-10
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 7){																			//User time between 5-7
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('B');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 100 && depth <= 110){																		//DEPTH BETWEEN 100-110 FEET
				
				if(time <= 0){																							//Impossible depth time
					System.out.println("You must input a time greater than 0");	
					setCheck(-1);
				}
				else if(time > 30){																						//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 30");
					setCheck(-1);
				}
				else if(time > 20 && time <= 30){																		//User time between 20-30
					setCheck(0);
					setDecompress(7);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 20){																		//User time between 15-20
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('G');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 13 && time <= 15){																		//User time between 13-15
					setCheck(0);
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 13){																		//User time between 10-13
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 10){																		//User time between 5-7
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 110 && depth <= 120){																		//DEPTH BETWEEN 110-120 FEET
				
				if(time <= 0){																							//Impossible depth time
					System.out.println("You must input a time greater than 0");	
					setCheck(-1);
				}
				else if(time > 30){																						//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 30");
					setCheck(-1);
				}
				else if(time > 25 && time <= 30){																		//User time between 25-30
					setCheck(0);
					setDecompress(14);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 15 && time <= 25){																		//User time between 15-25
					setCheck(0);
					setDecompress(6);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('I');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 12 && time <= 15){																		//User time between 12-15
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('F');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 10 && time <= 12){																		//User time between 10-12
					setCheck(0);
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 10){																		//User time between 5-10
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
			else if(depth > 120 && depth <= 130){																		//DEPTH BETWEEN 120-130 FEET
				
				if(time <= 0){																							//Impossible depth time
					System.out.println("You must input a time greater than 0");	
					setCheck(-1);
				}
				else if(time > 25){																						//If user wants to die
					System.out.println("Dive time for " + depth + getUnit() + " should not be greater than 25");
					setCheck(-1);
				}
				else if(time > 10 && time <= 25){																		//User time between 10-25
					setCheck(0);
					setDecompress(10);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('J');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 8 && time <= 10){																		//User time between 8-10
					setCheck(0);
					setDecompress(5);
					System.out.println("Decompress for " + getDecompress() + " minutes at every 15 feet");
					setGroup('E');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else if(time > 5 && time <= 8){																			//User time between 5-8
					setCheck(0);
					setGroup('D');
					System.out.println("Dive Group: " + getDiveGroup());
				}
				else{																									//User time between 1-5
					setCheck(0);
					setGroup('C');
					System.out.println("Dive Group: " + getDiveGroup());
				}
			}
		}
	}
	
	/*
	 * A method that will print out the user's planned depth
	 * 	and dive time
	 */
	public void printUserInputs(){
		System.out.println("Depth: " + getUserDepth() + getUnit());
		System.out.println("Time: " + getUserTime() + " minutes");
	}
	
}
